package com.itheima.dao;

import com.itheima.pojo.OrderSetting;
import org.aspectj.weaver.ast.Or;

import java.util.Date;
import java.util.List;
import java.util.Map;

/***
 * 批量预约设置
 */
public interface OrderSettingDao {
    /***
     * 保存预约
     * @param orderSetting
     */
    void save(OrderSetting orderSetting);

    /***
     * 查找日期是否重复
     * @param orderDate
     * @return
     */
    int findCountByOrderDate(Date orderDate);

    /***
     * 更新数据
     * @param orderSetting
     */
    void editNumberByOrderDate(OrderSetting orderSetting);

    /***
     * 根据年月查询预约并回显
     * @param map
     * @return
     */
    List<OrderSetting> getOrderSettingByMonth(Map<String, String> map);

    /***
     * 根据时间查询预约
     * @param date
     * @return
     */
    OrderSetting findOrderSettingByOrderDate(Date date);

    /***
     * 根据时间预约人数+1
     * @param date
     */
    void editReservations(Date date);

    /***
     * 定时删除预约设置
     * @param date
     */
    void delete(String date);
}
